[Javascript] mouseover select option

Roland Neilands rneilands at pulsemining.com.au
Tue Oct 26 19:02:36 CDT 2004


Got it, for those that care:

<select onMouseOver="window.status=this.options[this.options.selectedIndex].title; return true;" onMouseOut="window.status=' '; return true;">
...
</select>

Good enough in IE, but Moz does the options too.

Cheers,
Roland

> -----Original Message-----
> From: javascript-bounces at LaTech.edu
> [mailto:javascript-bounces at LaTech.edu]On Behalf Of Roland Neilands
> Sent: Wednesday, 27 October 2004 9:29 AM
> To: [JavaScript List]
> Subject: RE: [Javascript] mouseover select option
> 
> 
> Allard,
> 
> Thanks for the reply.
> 
> How should the function get the option description? (not just the selected option but the moused over option in the 
> dropdown, although either would do really). I've added title attributes to the options, but don't know how to reference 
> the option itself.
> 
> Regards,
> Roland
> 
> > -----Original Message-----
> > From: javascript-bounces at LaTech.edu
> > [mailto:javascript-bounces at LaTech.edu]On Behalf Of Allard Schripsema
> > Sent: Tuesday, 26 October 2004 9:53 PM
> > To: [JavaScript List]
> > Subject: RE: [Javascript] mouseover select option
> > 
> > 
> > you can use a span and a function to get the value of the select:
> > <Span onmouseover ="showStatusSelect()">
> > <select ......
> > ....
> > ....
> > </select>
> > </span>
> > Should work
> > -----Original Message-----
> > From: javascript-bounces at LaTech.edu
> > [mailto:javascript-bounces at LaTech.edu]On Behalf Of Roland Neilands
> > Sent: Monday, October 25, 2004 8:50 PM
> > To: JavaScript List
> > Subject: [Javascript] mouseover select option
> > 
> > 
> > I've just tried using a mouseover on a select option for the first time, which seems to work fine in Mozilla, but not in 
> > IE 6. I'd prefer not to use the full description due to space limitations.
> > 
> > Does anyone know how to get this working?
> > 
> > <select name="Org" id="Org" onChange="newOrg(this.value);">
> > <option value="DEV" onMouseOver="window.status='Development System'; return true;" onMouseOut="window.status=' '; return 
> > true;" SELECTED>DEV</option>
> > <option value="TST" onMouseOver="window.status='Testing Environment'; return true;" onMouseOut="window.status=' '; return 
> > true;">TST</option>
> > </select>
> > 
> > Regards,
> > Roland 
> > 
> > _______________________________________________
> > Javascript mailing list
> > Javascript at LaTech.edu
> > https://lists.LaTech.edu/mailman/listinfo/javascript
> > 
> > 
> > _______________________________________________
> > Javascript mailing list
> > Javascript at LaTech.edu
> > https://lists.LaTech.edu/mailman/listinfo/javascript
> > 
> 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
> 




More information about the Javascript mailing list